Outdated CHICKEN release

This is a manual page for an old and unsupported version of CHICKEN. If you are still using it, please consider migrating to the latest version. You can find the manual for the latest release here.

  1. Outdated CHICKEN release
  2. Non-standard read syntax
    1. Multiline Block Comment
    2. Expression Comment
    3. External Representation
    4. Syntax Expression
    5. Location Expression
    6. Keyword
    7. Multiline String Constant
    8. Multiline String Constant with Embedded Expressions
    9. Foreign Declare
    10. Sharp Prefixed Symbol
    11. Bang
      1. Line Comment
      2. Eof Object
      3. DSSSL Formal Parameter List Annotation
      4. Read Mark Invocation
    12. Case Sensitive Expression
    13. Case Insensitive Expression
    14. Conditional Expansion

Non-standard read syntax

Multiline Block Comment

#| ... |# 

A multiline block comment. May be nested. Implements SRFI-30

Expression Comment

#;EXPRESSION

Treats EXPRESSION as a comment. That is, the comment runs through the whole S-expression, regardless of newlines, which saves you from having to comment out every line, or add a newline in the middle of your parens to make the commenting of the last line work, or other things like that.

External Representation

#,(CONSTRUCTORNAME DATUM ...)

Allows user-defined extension of external representations. (For more information see the documentation for SRFI-10)

Syntax Expression

#'EXPRESSION

An abbreviation for (syntax EXPRESSION).

Location Expression

#$EXPRESSION

An abbreviation for (location EXPRESSION).

Keyword

#:SYMBOL

Syntax for keywords. Keywords are symbols that evaluate to themselves, and as such don't have to be quoted.

Multiline String Constant

#<<TAG

Specifies a multiline string constant. Anything up to a line equal to TAG (or end of file) will be returned as a single string:

(define msg #<<END
 "Hello, world!", she said.
END
)

is equivalent to

(define msg "\"Hello, world!\", she said.")

Multiline String Constant with Embedded Expressions

#<#TAG

Similar to #<<, but allows substitution of embedded Scheme expressions prefixed with # and optionally enclosed in curly brackets. Two consecutive #s are translated to a single #:

(define three 3)
(display #<#EOF
This is a simple string with an embedded `##' character
and substituted expressions: (+ three 99) ==> #(+ three 99)
(three is "#{three}")
EOF
)

prints

This is a simple string with an embedded `#' character
and substituted expressions: (+ three 99) ==> 102
(three is "3")

Foreign Declare

#> ... <#

Abbreviation for foreign-declare " ... ").

Sharp Prefixed Symbol

#%... 

Reads like a normal symbol.

Bang

#!... 

Interpretation depends on the directly following characters. Only the following are recognized. Any other case results in a read error.

Line Comment

Eof Object

DSSSL Formal Parameter List Annotation

Read Mark Invocation

Case Sensitive Expression

#cs...

Read the next expression in case-sensitive mode (regardless of the current global setting).

Case Insensitive Expression

#ci...

Read the next expression in case-insensitive mode (regardless of the current global setting).

Conditional Expansion

#+FEATURE EXPR

Equivalent to

(cond-expand (FEATURE EXPR) (else))

Previous: Extensions to the standard

Next: Non-standard macros and special forms